package cn.interestingshop.service.impl;

import cn.interestingshop.dao.UserDao;
import cn.interestingshop.dao.impl.UserDaoImpl;
import cn.interestingshop.entity.User;
import cn.interestingshop.service.UserService;

import java.util.List;

public class UserServiceImpl implements UserService {
    UserDao dao=new UserDaoImpl();

    @Override
    public User selectOne(String account, String password) {
        return dao.selectOne(account,password);
    }

    @Override
    public int insert(User user) {
        return dao.insert(user);
    }

    @Override
    public List<User> selectAll(int pageNo, int pageSize) {
        return dao.selectAll(pageNo,pageSize);
    }

    @Override
    public int selectCount() {
        return dao.selectCount();
    }

    @Override
    public int delete(int id) {
        return dao.delete(id);
    }

    @Override
    public User selectOne(int id) {
        return dao.selectOne(id);
    }

    @Override
    public int update(User user) {
        return dao.update(user);
    }
}
